<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>身份选择登录</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f4f4f9;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            text-align: center;
        }

        .container {
            background-color: #fff;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            width: 300px;
        }

        h1 {
            color: #333;
            font-size: 24px;
            margin-bottom: 20px;
        }

        select {
            width: 100%;
            padding: 10px;
            margin-bottom: 20px;
            border: 1px solid #ccc;
            border-radius: 5px;
            font-size: 16px;
            color: #555;
        }

        button {
            width: 100%;
            padding: 10px;
            background-color: #4CAF50;
            color: white;
            font-size: 16px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        button:hover {
            background-color: #45a049;
        }

        option {
            font-size: 16px;
        }
    </style>
</head>

<body>
<div class="container">
    <h1>请选择您的身份登录</h1>
    <select id="identitySelect">
        <option value="user">普通用户</option>
        <option value="admin">管理员</option>
    </select>
    <button onclick="redirectToLogin()">登录</button>
</div>

<script>
    function redirectToLogin() {
        var selectedIdentity = document.getElementById('identitySelect').value;
        if (selectedIdentity === 'user') {
            window.location.href = 'userlogin.html'; // 普通用户登录页面
        } else if (selectedIdentity === 'admin') {
            window.location.href = 'adminlogin.html'; // 管理员登录页面
        }
    }
</script>
</body>

</html>
